<!DOCTYPE html>
<html>
<head>
  <script src="https://cdn.jsdelivr.net/npm/jsbarcode@3.11.0/dist/JsBarcode.all.min.js"></script>
</head>
<body>
  <svg id="barcode"></svg>
  <script>
	var myVar=setInterval(function(){myTimer()},1000);
	function myTimer(){

		const now = new Date();
		const year = now.getFullYear();
		const month = ('0'+(now.getMonth()+1)).slice(-2);
		const day = ('0' + now.getDate()).slice(-2);
		const hours = ('0' + now.getHours()).slice(-2);
		const minutes = ('0' + now.getMinutes()).slice(-2);
		const seconds = ('0' + now.getSeconds()).slice(-2);

		const formattedTime = year + month + day + hours + minutes + seconds;

		JsBarcode("#barcode", formattedTime);
	}
  </script>

</body>
</html>